package helloworld;

import java.util.Date;

public class User {

	private Integer id;/** 主键,对象唯一标识 */
	private String name;
	private Date birthday;
	
	//~==========================constructor
	public User() {//package可见性以上,有助于hibernate实例化
		
	}
	
	public User(String name, Date birthday) {
		this.name = name;
		this.birthday = birthday;
	}

	//~==============================setter & getter
	public Integer getId() {
		return id;
	}
	//hibernate generator use it
	public void setId(Integer id) {
		this.id = id;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	
	public String toString(){
		return "User:"+name+","+birthday;
	}
}
